package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.EmployeeDTO;
import com.sky.dto.EmployeePageQueryDTO;
import com.sky.entity.Employee;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Author：XueShiHao
 * @Date：2025/6/3 星期二 10:44:53
 * @Email:747278007@qq.com
 * @Description:
 **/
@Mapper
public interface EmployeeMapper {

    /**
     * 根据员工姓名查询用户信息
     * @param username
     * @return
     */
    Employee getByUsername(@Param("username") String username);

    /**
     * 员工信息的分页查询
     * @param employeePageQueryDTO
     * @return
     */
   Page<Employee> pageQuery(EmployeePageQueryDTO employeePageQueryDTO);

    /**
     * 根据id查询用户的信息
     * @param id
     * @return
     */
   Employee getById(@Param("id") long id);

    /**
     * 员工信息新增
     * @param employee
     */

   @AutoFill(OperationType.INSERT)
    void insert(Employee employee);

    /**
     * 员工信息修改
     * @param employee
     */
   @AutoFill(OperationType.UPDATE)
void update(Employee employee);


}
